header {
  height: @topHeight;
  position: relative;

  h1#logo {
    float: left;
    line-height: 22px;
    display: inline-block;
    margin: 0;
    padding: 0 5px 0 5px;
    font-size: 16px;

    span,
    i {
      float: left;
    }

    i {
      line-height: 22px;
      font-size: 15px;
    }
  }

  div.header-errors {
    text-align: right;
    position: absolute;
    z-index: 1000;
    top: 0;
    right: 0;

    i {
      line-height: 16px;
    }

    div.icon-wrapper {
      padding-right: 10px;
      display: inline-block;
      position: relative;

      a {
        color: white;
      }
    }

    div.icon-contents {
      display: none;
      position: absolute;
      width: 600px;
      border: 5px solid;
      max-height: 500px;
      overflow-y: auto;
      background: white;
      padding: 5px;
      color: black;
      left: 100%;
      text-align: left;
      pointer-events: all;
      user-select: text;

      p {
        margin: 15px 0 10px 0;
        padding-bottom: 10px;
        border-bottom: 1px solid;
        line-height: 24px;

        &:last-child {
          border-bottom: none;
        }

        span.meta {
          display: block;
          font-size: 12px;
        }

        textarea {
          font-size: @textSize;
          line-height: 20px;
          resize: none;
          height: 100px;
        }

        button {
          float: right;
        }
      }
    }

    div.icon-contents:hover,
    div.icon-wrapper:hover div.icon-contents {
      display: block;
    }
  }

  &.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid;
    padding-right: 20px;

    &.flex {
      display: flex;
      justify-content: space-between;
    }

    h2 {
      margin-top: 15px;
      margin-left: 20px;
      font-size: @titleTextSize;

      .no-select;
    }

    button {
      padding: 8px;
      margin: 11px 0 11px 11px;

      i {
        margin-right: 4px;
        font-size: @bigTextSize;
      }
    }

    .button-set {
      button {
        margin-left: @borderRadius;
      }
    }

    div.header-errors {
      margin-top: 20px;
      position: absolute;

      div.icon-contents {
        margin-left: -600px;
        left: 0;
      }
    }
  }
}

/* Make the logo float right on MacOS, as the control buttons live on the left */
section.Darwin header h1#logo {
  float: right;
}
